package tianrun.ziguan.api.calculate.config.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import tianrun.ziguan.api.calculate.config.entity.base.BaseAssetModule;
import tianrun.ziguan.api.calculate.config.enums.ComputeModeEnum;

import java.io.Serializable;

/**
 * 资产用量分析组件
 *
 * @author zhaoqi
 */
public class TAssetUsageAnalysisModule extends BaseAssetModule implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 名称
     */
    @TableField("cal_asset_id")
    private Long calAssetId;

    /**
     * 描述
     */
    @TableField("description")
    private String description;


    /**
     * 计算点
     */
    @TableField("cal_label")
    private String calLabel;

    /**
     * 计算点计算所需点位
     */
    @TableField("label")
    private String label;

    /**
     * 点位名称
     */
    @TableField("label_name")
    private String labelName;

    /**
     * 小数位
     */
    @TableField("decimal_places")
    private Integer decimalPlaces;

    /**
     * 有效步长，防止跳变。
     */
    @TableField("effective_step_size")
    private Integer effectiveStepSize;
    /**
     * 计算方式
     */
    @TableField("compute_mode")
    private ComputeModeEnum computeMode;
    /**
     * 数据开关；0不计算，1计算
     */
    @TableField("data_switch")
    private Boolean dataSwitch;

    /**
     * 时间粒度；5分钟，10分钟，15分钟
     */
    @TableField("time_granularity")
    private Integer timeGranularity;
    /**
     * 延迟计算秒数
     */
    @TableField("delay_second")
    private Integer delaySecond;
    /**
     * 中断判断(秒)
     */
    @TableField("interrupt_judgment")
    private Integer interruptJudgment;
    /**
     * 是否被引用；0不是，1是
     */
    @TableField("referenced")
    private Boolean referenced;

    /**
     * 是否有效；0无效，1有效
     */
    @TableLogic(value = "true", delval = "false")
    @TableField("is_valid")
    private Boolean isValid;
    private Long templateModuleId;
    public Long getTemplateModuleId() {
        return templateModuleId;
    }

    public void setTemplateModuleId(Long templateModuleId) {
        this.templateModuleId = templateModuleId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCalAssetId() {
        return calAssetId;
    }

    public void setCalAssetId(Long calAssetId) {
        this.calAssetId = calAssetId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getInterruptJudgment() {
        return interruptJudgment;
    }

    public void setInterruptJudgment(Integer interruptJudgment) {
        this.interruptJudgment = interruptJudgment;
    }

    public String getCalLabel() {
        return calLabel;
    }

    public Integer getDelaySecond() {
        return delaySecond;
    }

    public void setDelaySecond(Integer delaySecond) {
        this.delaySecond = delaySecond;
    }

    public void setCalLabel(String calLabel) {
        this.calLabel = calLabel;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getLabelName() {
        return labelName;
    }

    public void setLabelName(String labelName) {
        this.labelName = labelName;
    }

    public Integer getDecimalPlaces() {
        return decimalPlaces;
    }

    public void setDecimalPlaces(Integer decimalPlaces) {
        this.decimalPlaces = decimalPlaces;
    }

    public Integer getEffectiveStepSize() {
        return effectiveStepSize;
    }

    public void setEffectiveStepSize(Integer effectiveStepSize) {
        this.effectiveStepSize = effectiveStepSize;
    }

    public ComputeModeEnum getComputeMode() {
        return computeMode;
    }

    public TAssetUsageAnalysisModule setComputeMode(ComputeModeEnum computeMode) {
        this.computeMode = computeMode;
        return this;
    }

    public Boolean getDataSwitch() {
        return dataSwitch;
    }

    public void setDataSwitch(Boolean dataSwitch) {
        this.dataSwitch = dataSwitch;
    }

    public Integer getTimeGranularity() {
        return timeGranularity;
    }

    public void setTimeGranularity(Integer timeGranularity) {
        this.timeGranularity = timeGranularity;
    }

    public Boolean getReferenced() {
        return referenced;
    }

    public void setReferenced(Boolean referenced) {
        this.referenced = referenced;
    }

    public Boolean getIsValid() {
        return isValid;
    }

    public void setIsValid(Boolean isValid) {
        this.isValid = isValid;
    }

}
